
/*UserMember Delete*/
function ajaxDeleteUserMember(param) {
	
	if (!confirm('確認要刪除嗎?')) {
		return;
	}
	
	$.ajax({
	  url: 'deleteUserMember.action',
	  context: this,
	  type: 'POST',
	  data: {userId : param},
	  success: function(response) {
		  alert('刪除成功!!');
		  //$('queryBtn').click();
		  $( '#query_form' ).submit();
	  }
	});
	
}

/*PublishMessage Delete*/
function ajaxDeletePublishMessage(param) {
	
	if (!confirm('確認要刪除嗎?')) {
		return;
	}
	
	$.ajax({
	  url: 'deletePublishMessage.action',
	  context: this,
	  type: 'POST',
	  data: {pmSeqId : param},
	  success: function(response) {
		  alert('刪除成功!!');
		  //$('queryBtn').click();
		  $( 'query_form' ).submit();
	  }
	});
	
}

/*Payment Method Delete*/
function ajaxDeletePaymentMethod(param) {
	
	if (!confirm('確認要刪除嗎?')) {
		return;
	}
	
	$.ajax({
	  url: 'deletePaymentMethod.action',
	  context: this,
	  type: 'POST',
	  data: {paySeqId : param},
	  success: function(response) {
		  alert('刪除成功!!');
		  //$('queryBtn').click();
		  $( 'query_form' ).submit();
	  }
	});
	
}

/*Transport Method Delete*/
function ajaxDeleteTransportMethod(param) {
	
	if (!confirm('確認要刪除嗎?')) {
		return;
	}
	
	$.ajax({
	  url: 'deleteTransportMethod.action',
	  context: this,
	  type: 'POST',
	  data: {transSeqId : param},
	  success: function(response) {
		  alert('刪除成功!!');
		  //$('queryBtn').click();
		  $( 'query_form' ).submit();
	  }
	});
	
}

/*Category Big Delete*/
function ajaxDeleteCategoryBig(param) {
	
	if (!confirm('確認要刪除嗎?')) {
		return;
	}
	
	$.ajax({
	  url: 'deleteCategoryBig.action',
	  context: this,
	  type: 'POST',
	  data: {catBigSeqId : param},
	  success: function(response) {
		  alert('刪除成功!!');
		  //$('queryBtn').click();
		  $( 'query_form' ).submit();
	  }
	});
	
}

/*Category Medium Delete*/
function ajaxDeleteCategoryMedium(param) {
	
	if (!confirm('確認要刪除嗎?')) {
		return;
	}
	
	$.ajax({
	  url: 'deleteCategoryMedium.action',
	  context: this,
	  type: 'POST',
	  data: {catMedSeqId : param},
	  success: function(response) {
		  alert('刪除成功!!');
		  //$('queryBtn').click();
		  $( 'query_form' ).submit();
	  }
	});
	
}

/*Shopping Money Delete*/
function ajaxDeleteShoppingMoney(param) {
	
	if (!confirm('確認要刪除嗎?')) {
		return;
	}
	
	$.ajax({
	  url: 'deleteShoppingMoney.action',
	  context: this,
	  type: 'POST',
	  data: {shopMonSeqId : param},
	  success: function(response) {
		  alert('刪除成功!!');
		  //$('queryBtn').click();
		  $( 'query_form' ).submit();
	  }
	});
	
}

/*Item Information Delete*/
function ajaxDeleteItemInformation(param) {
	
	if (!confirm('確認要刪除嗎?')) {
		return;
	}
	
	$.ajax({
	  url: 'deleteItemInformation.action',
	  context: this,
	  type: 'POST',
	  data: {itemInforSeqId : param},
	  success: function(response) {
		  alert('刪除成功!!');
		  //$('queryBtn').click();
		  $( '#query_form' ).submit();
	  }
	});
	
}

/*Change CategoryBig Insert CategoryMedium*/
function ajaxChangeCategoryBig(param) {
	
	if (param != "") {
		$.ajax({
			  url: 'ajaxChangeCategoryBig.action',
			  context: this,
			  type: 'POST',
			  data: {catBigSeqId : param},
			  dataType:"json",
			  success: function(json) {
				  
				  if (json.length > 0) {
					  
					  $("select[name*='categoryMediumBo.Seqid']")
					  .empty();
					  
					  for (var i = 0; i < json.length; i++) {
						  var JSONObject = json[i];
						  $("select[name*='categoryMediumBo.Seqid']")
						  .append("<option value='" + JSONObject.seqid + "'>" + JSONObject.name + "</option>");
					  }
				  } else {
					  $("select[name*='categoryMediumBo.Seqid']")
					  .empty();
				  }
				  
			  }
			});
	}
}

/*Item Stock Delete*/
function ajaxDeleteItemStock(param) {
	
	if (!confirm('確認要刪除嗎?')) {
		return;
	}
	
	$.ajax({
	  url: 'deleteItemStock.action',
	  context: this,
	  type: 'POST',
	  data: {itemStockSeqId : param},
	  success: function(response) {
		  alert('刪除成功!!');
		  //$('queryBtn').click();
		  $( '#query_form' ).submit();
	  }
	});
	
}

/*Order Information Delete*/
function ajaxDeleteOrderInformation(param) {
	
	if (!confirm('確認要刪除嗎?')) {
		return;
	}
	
	$.ajax({
	  url: 'deleteOrderInformation.action',
	  context: this,
	  type: 'POST',
	  data: {orderInforSeqId : param},
	  success: function(response) {
		  alert('刪除成功!!');
		  //$('queryBtn').click();
		  $( '#query_form' ).submit();
	  }
	});
	
}

/*Order Detail Delete*/
function ajaxDeleteOrderDetail(param) {
	
	if (!confirm('確認要刪除嗎?')) {
		return;
	}
	
	$.ajax({
	  url: 'deleteOrderDetail.action',
	  context: this,
	  type: 'POST',
	  data: {orderDetailSeqId : param},
	  success: function(response) {
		  alert('刪除成功!!');
		  //$('queryBtn').click();
		  $( '#query_form' ).submit();
	  }
	});
	
}
